package org.example.demo15_command.demo2;

public class Controller {
    private AbstractButton addButton,deleteButton,checkButton;
    public Controller(AbstractButton addButton,AbstractButton deleteButton,AbstractButton checkButton){
        this.addButton = addButton;
        this.deleteButton = deleteButton;
        this.checkButton = checkButton;
    }
    public void add(){
        addButton.execute();
    }
    public void delete(){
        deleteButton.execute();
    }
    public void check(){
        checkButton.execute();
    }
}
